#!/usr/bin/python
# -*- coding: utf-8 -*-

'''
Introduction to Programming in Java - An Interdisciplinary Approach

All book programs ported to Python by
Scott C. King (revisionx at {gee}ma1l <dot> c0m).

All program examples pass Pylint with a perfect 10.00 score.
Pylint:  http://www.pylint.org/


# Program 1.2.1 - String concatenation example

Syntax:
python ruler.py


Notes:
Constants at the module level should be in all caps.  Constants are usually
defined on a module level and written in all capital letters with underscores
separating words. Examples include MAX_OVERFLOW and TOTAL.

http://legacy.python.org/dev/peps/pep-0008/#prescriptive-naming-conventions


Both of the examples shown below will pass Pylint with a score of 10.0.

'''

# Module level (typically module globals)
RULER1 = "1"
RULER2 = RULER1 + " 2 " + RULER1
RULER3 = RULER2 + " 3 " + RULER2
RULER4 = RULER3 + " 4 " + RULER3
print RULER1
print RULER2
print RULER3
print RULER4


# Function level (main function)
def main():
    ''' String concatenation example '''

    print
    ruler_1 = "1"
    ruler_2 = ruler_1 + " 2 " + ruler_1
    ruler_3 = ruler_2 + " 3 " + ruler_2
    ruler_4 = ruler_3 + " 4 " + ruler_3
    print ruler_1
    print ruler_2
    print ruler_3
    print ruler_4


if __name__ == '__main__':
    main()
